<template>
  <div class="wrapper wrapper-content animated fadeInRight v-cloak" v-cloak>
    <div class="row">
      <div class="form col-md-12">
        <div class="clearfix "></div>
        <div class="col-md-6">
          <div class="form-group clearfix">
            <label class="control-label">用户类型：</label>
            <div class="col-md-12 form-control">
              {{item.type}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">行政区域名称：</label>
            <div class="col-md-12 form-control">
              {{item.areaName}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户账号：</label>
            <div class="col-md-12 form-control">
              {{item.account}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户性别：</label>
            <div class="col-md-12 form-control">
              {{item.gender}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">最后登录：</label>
            <div class="col-md-12 form-control">
              {{item.lastLogin | date('yyyy-MM-dd HH:mm:ss')}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">登录次数：</label>
            <div class="col-md-12 form-control">
              {{item.count}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户名称：</label>
            <div class="col-md-12 form-control">
              {{item.name}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户级别：</label>
            <div class="col-md-12 form-control">
              {{item.level}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户单位：</label>
            <div class="col-md-12 form-control">
              {{item.unitName}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">联系单位电话：</label>
            <div class="col-md-12 form-control">
              {{item.unitCellphone}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户职务：</label>
            <div class="col-md-12 form-control">
              {{item.job}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">用户电话：</label>
            <div class="col-md-12 form-control">
              {{item.cellphone}}
            </div>
          </div>
        </div>
        <div class="col-md-6">
          <div class="form-group clearfix">
            <label class="control-label">用户河道名称：</label>
            <div class="col-md-12 form-control">
              {{item.riverName}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">联系部门名称：</label>
            <div class="col-md-12 form-control">
              {{item.orgName}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">监督河道：</label>
            <div class="col-md-12 form-control">
              {{item.superviseRiverReach}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">主要职责：</label>
            <div class="col-md-12 form-control">
              {{item.coreResponsibility}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">邮箱：</label>
            <div class="col-md-12 form-control">
              {{item.email}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">固定电话：</label>
            <div class="col-md-12 form-control">
              {{item.telephone}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">身份证号：</label>
            <div class="col-md-12 form-control">
              {{item.idCard}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">联系地址：</label>
            <div class="col-md-12 form-control">
              {{item.address}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">状态：</label>
            <div class="col-md-12 form-control">
              {{item.state}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">备注：</label>
            <div class="col-md-12 form-control">
              {{item.memo}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">创建时间：</label>
            <div class="col-md-12 form-control">
              {{item.dateCreated | date('yyyy-MM-dd HH:mm:ss')}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label">更新时间：</label>
            <div class="col-md-12 form-control">
              {{item.dateUpdated | date('yyyy-MM-dd HH:mm:ss')}}
            </div>
          </div>
        </div>
        <div class="clearfix "></div>
        <div class="col-12 text-center" style="height: 50px;">
          <div>
            <a @click="lbox.closeMyBoxLayer()" class="btn btn-danger" href="javascript:">返回</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  import '@/assets/css/style.css'

  import axios from 'axios'
  import {site} from '@/assets/js/boss'

  export default {
    data() {
      return {
        item: {}
      }
    },
    mounted() {
      let that = window.$vueApp = this;
      document.getElementsByTagName('body')[0].className = 'fixed-sidebar full-height-layout';
      that.staff.init(function () {
        axios.get(site.staff.info + sessionStorage.getItem(site.staff.info), {}).then(function (response) {
          const result = response.data;
          if (result.code === 0) {
            that.item = result.data;
          } else {
            alert(result.message);
          }
        });
      });
    },
    methods: {}
  }
</script>
